module App::Controller
    class ItemForm < Qt::Object
        def connect_signals(view)
            connect(view.buttonbox, SIGNAL('accepted()'), self, SLOT('accept()'))
            connect(view.line, SIGNAL('returnPressed()'), view.buttonbox, SIGNAL('accepted()'))
            sc = Qt::Shortcut.new Qt::KeySequence.new(Qt::Key_Escape), view
            connect sc, SIGNAL('activated()'), view, SLOT('close()')
            connect(view.buttonbox, SIGNAL('rejected()'), view, SLOT('close()'))
        end
    end
end
